package com.myview;

import android.app.ProgressDialog;
import android.content.Context;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.TextView;

import com.bumptech.glide.Glide;
import com.xiaochun.hxhj.R;


/**
 * @Description:自定义对话框
 * @author http://blog.csdn.net/finddreams
 */
public class CustomProgressDialog extends ProgressDialog {
	private AnimationDrawable mAnimation;
	private Context mContext;
	private ImageView mImageView;
	private String mLoadingTip;
	private TextView mLoadingTv;
	public CustomProgressDialog(Context context, String content, int theme) {
		super(context, theme);
		this.mContext = context;
		this.mLoadingTip = content;
		setCanceledOnTouchOutside(false);// 设置不能点击对话框外边取消当前对话框
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		initView();
		initData();
	}

	private void initData() {
		int res= R.mipmap.loading52;
		Glide.with(mContext)
			 .load(res).
				into(mImageView);
//		GlideUtils.loadRoundCircleImage(mContext,res,mImageView);
	}



	private void initView() {
		setContentView(R.layout.progress_dialog2);
		mImageView = (ImageView) findViewById(R.id.loadingIv);
	}
}

